Riemann–Stieltjes integral application to probability theory